import Vue from 'vue'
import Vuex from 'vuex'
import locationModule from './modules/location'
import homeShopModule from './modules/home'
import deatilslist from './modules/deatils'
import loginModule from './modules/login'
import cartList from './modules/cart'
import storge from 'vuex-persistedstate'
Vue.use(Vuex)
export default new Vuex.Store({
  plugins: [storge({
    reducer: (state) => {
      return {
        cart: state.cartList.cart,
      }
    },
  })],
  modules: {
    locationModule,
    deatilslist,
    homeShopModule,
    loginModule,
    cartList,
  },
})
